import { type ThemeConfig, theme } from "@/components/base";
import type { AliasToken } from "antd/es/theme/internal";

interface IAliasToken extends AliasToken {
    /** 顶部标签选中背景颜色 */
    colorTopTabsBjPrimary?: string;

    /** 顶部标签未选中背景颜色 */
    colorTopTabsBj?: string;

    /** 顶部标签未选中文本颜色 */
    colorTopTabsTextPrimary?: string;

    /** 顶部标签选中文本颜色 */
    colorTopTabsText?: string;
}

export interface IThemeConfig {
    key: IThemeKet;
    name: string;
    description: string;
    theme: ThemeConfig & { token: Partial<IAliasToken> };
}

/** 主题类型 */
export type IThemeKet = 'dsff-default' | 'dsff-algorithm';

/**
 * 主题配置
 */
export const themeConfig: Map<IThemeKet, IThemeConfig> = new Map([
    // 默认
    ['dsff-default', {
        key: 'dsff-default',
        name: '默认',
        description: '默认风格',
        theme: {
            "cssVar": { "key": "dsff" },
            "algorithm": [],
            "token": {
                // "colorPrimary": "#f08230",
                // "colorInfo": "#f08230",
            },
            "components": {
                "Layout": {
                    "headerBg": "#1677ff",
                    "headerHeight": 40,
                }
            }
        }
    }],

    // 紧凑
    ['dsff-algorithm', {
        key: 'dsff-algorithm',
        name: '紧凑',
        description: '紧凑风格',
        theme: {
            "cssVar": { key: 'dsff' },
            "algorithm": [theme.compactAlgorithm],
            "token": {
                "colorPrimary": "#f08230",
                "antColorInfo": "#f08230",
            },
        }
    }],
]);